<template>
  <div
    :class="[{'is-active': isActive}]"
    @click="toggleClick"
  >
    <i class="iconfont iconicon_mianbaodaohang"></i>
  </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'

@Component({
  name: 'Hamburger'
})
export default class extends Vue {
  @Prop({ default: false }) private isActive!: boolean

  private toggleClick() {
    this.$emit('toggle-click')
  }
}
</script>

<style lang="scss" scoped>
.svg-icon {
  vertical-align: middle;
}

.is-active {
  transform: rotate(180deg);
}

.iconicon_mianbaodaohang, .iconicon_mianbaodaohang::before, .iconicon_mianbaodaohang::after {
  color: #FFFFFF;
  font-size: 20px;
}
</style>
